#!/usr/bin/env php
<?php

require __DIR__.'/../vendor/autoload.php';

// Installing Lit and starting test after, to load namespaces of created Lit.

use Illuminate\Support\Facades\Artisan;
use Tests\FrontendTestCase;

// Creating database.sqlite
shell_exec('php '.__DIR__.'/../vendor/orchestra/testbench-dusk/create-sqlite-db');

$test = new FrontendTestCase;
$test->setUp();
$test->installLit(
    $force = true
);

echo "\033[32m Installed Lit successfully.\n\033[0m";

Artisan::call('dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`');
echo "\033[32m Installed latest version of chrome-driver.\n\033[0m";
